//
//  CustomView.m
//  婚礼记
//
//  Created by Lovetong on 15/3/7.
//  Copyright (c) 2015年 mac. All rights reserved.
//

#import "CustomView.h"

@implementation CustomView

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint point = [touch locationInView:self];
    [self hitTest:point withEvent:event];
}

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    UIScrollView *scrollView = (UIScrollView *)[self.subviews firstObject];
    return [self pointInside:point withEvent:event] ? scrollView : nil;
}

@end
